<?php
/**
 * Created by PhpStorm.
 * User: ocsen
 * Date: 5/1/14
 * Time: 1:36 PM
 */
 
$client = new SoapClient("wsdl_files/wsdl.xml");
if($client)
{

	$parameters = array('pUser' => 'test',
				  'pPassword' => 'test',
				  'pLanguage' => 2,
				  'pCenter' => 1,
				  'pDeposit' => 0,
				  'pManager' => '',
				  'pClient' => 73,
				  'pPool' => 0,
				  'pSecurity' => 0,
				  'pPortfolio' => 0,
				  'pPosition' => 2,
				  'pStatus' => 5,
				  'pHistorical' => FALSE,
				  'pValueDate' => '',
				  'pNilSecurity' => FALSE,
				  'pNilFidu' => FALSE,
				  'pNilCash' => FALSE,
				  'result' => '',
				  'ttAllPosition' => array ('ttAllPositionRow' => array( 
 								        'PosCategory' => '',
							        'PosInvestmentType' => 0,
 							        'PosName' => '',
 							        'PosCurrency' => '',
							        'PosQuantity' => 0,
 							        'PosMarketPrice' => 0,
 							        'PosMarketDate' => '2014-05-23',
								 'PosMarketValue' => 0,
 							        'PosInterestAmount' => 0,							      
 							        'PosVariableRate' => '',
								 'PosFiduIsNonFix' => FALSE,
								 'PosFiduInvestmentGroup' => 0)));


 
  $resultPositions = $client->getAllPositions($parameters); 
  
  
  var_dump($resultPositions);
  $properties = get_object_vars($resultPositions->ttAllPosition);
  print "<pre>";
  print_r($properties);
  print "</pre>";
 // var_dump($resultPositions->ttAllPosition);
}
?>
<script>
obj = JSON.parse('<?php echo json_encode($resultPositions) ?>');
</script>